package com.hank.jms.queue;

import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;

public class Receiver2 {
    public static String BROKER_URL = "tcp://192.168.0.103:61616";

    public static void main(String[] args) {
        String[] brokers = new String[]{"tcp://10.10.1.44:61616"};


        for (int i = 0; i < brokers.length; i++) {
            String url = brokers[i];
            final ConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url);
            for (int j = 0; j < 1; j++) {
                ConsumerMesasge th = new ConsumerMesasge(connectionFactory, i+"-"+j);
                th.start();
            }
        }
    }





}
